DROP TABLE IF EXISTS jms_ods.yl_tmsnew_tms_line_stop_point;
CREATE EXTERNAL TABLE jms_ods.yl_tmsnew_tms_line_stop_point(
 ID bigint comment "线路规划子表 - 经停点和时间窗表 ID",  --NUMBER(11)
 LINE_PLANNING_ID bigint comment "线路规划表ID",  --NUMBER(11)
 LINE_CODE string comment "线路编码",  --NVARCHAR2(30)
 STOP_LINE_CODE string comment "经停线路编码",  --NVARCHAR2(30)
 STOP_ORDER smallint comment "经停顺序",  --NUMBER(4)
 STOP_NETWORK_ID bigint comment "经停网点ID",  --NUMBER(11)
 STOP_NETWORK_CODE string comment "经停网点编码",  --NVARCHAR2(30)
 STOP_NETWORK_NAME string comment "经停网点名称",  --NVARCHAR2(30)
 TRANSPORT_DURAION bigint comment "运输时长(单位：MIN)",  --NUMBER(11)
 WAITING_TIMES bigint comment "等待时长(单位：MIN)",  --NUMBER(11)
 PLAN_ARRIVE_TIME string comment "规划到车时间",  --NVARCHAR2(10)
 PLAN_START_TIME string comment "规划发车时间",  --NVARCHAR2(10)
 ARRIVE_NETWORK_ID bigint comment "到达网点ID",  --NUMBER(11)
 ARRIVE_NETWORK_CODE string comment "到达网点编码",  --NVARCHAR2(30)
 ARRIVE_NETWORK_NAME string comment "到达网点名称",  --NVARCHAR2(30)
 ARRIVE_TIME string comment "到达时间",  --NVARCHAR2(10)
 UNLOAD_TYPE string comment "卸载类型",  --NVARCHAR2(5)
 STOWAGE_NETWORK string comment "配载网点",  --NVARCHAR2(200)
 PRODUCT_CODE string comment "产品编码",  --NVARCHAR2(10)
 SPAN_DAYS smallint comment "跨越天数",  --NUMBER(4)
 MILEAGE bigint comment "里程数（KM）",  --NUMBER(11)
 CREATE_BY_NAME string comment "创建人",  --NVARCHAR2(20)
 CREATE_TIME timestamp comment "创建时间",  --DATE
 UPDATE_BY_NAME string comment "更新人",  --NVARCHAR2(20)
 ADDRESS string comment "详细地址",  --NVARCHAR2(255)
 UPDATE_TIME timestamp comment "更新时间",  --DATE
 BATCH_TIME string comment "批次时间",  --NVARCHAR2(50)
 LATEST_ARRIVAL_TIME string comment "最晚到车时间"  --NVARCHAR2(5)
 )
 COMMENT '支线途经点'
 PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
 STORED AS PARQUET
 LOCATION '/dw/hive/jms_ods.db/external/yl_tmsnew_tms_line_stop_point'
 TBLPROPERTIES (
 'discover.partitions'='false',
 'parquet.column.index.access'='true'
 );

MSCK REPAIR TABLE jms_ods.yl_tmsnew_tms_line_stop_point;